<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <title>首页</title>
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <script th:src="@{/static/js/jquery.min.js}"></script>
    <style type="text/css">
        table {border-collapse: collapse; font-size: 14px; width: 80%; margin: auto}
        table, th, td {border: 1px solid darkslategray;padding: 10px}
    </style>
    <style type="text/css">
        html,body {
            background: linear-gradient(to bottom, #fff1eb 0%, #ace0f9 100%);
            width: 100%;
            height: 100%;
        }
    </style>
</head>
<body>
<div style="text-align: center">
    <span style="color: darkslategray; font-size: 30px"></span>

    <div style="margin: 20px 100px 40px 0;font-size: 18px;text-align: right;">
        <strong>欢迎<span th:text="${user.username}"></span>登录系统</strong>
    </div>

    <div style="text-align: left;overflow:hidden;margin-bottom: 30px;">
        <div style="float: right; margin-right: 200px;">
            <form th:action="add" method="get">
                <input type="hidden" name="userID" th:value="${user.id}">
                <a th:href="@{'/'}">退出登录</a>
                <a th:href="@{'/truncate-store' +  '?token=' + ${user.token} }">清空仓库</a>
                <a th:href="@{'/create-store' +  '?token=' + ${user.token} }">生成仓库</a>
                <a th:href="@{'/tabu' + '?token=' + ${user.token}}">最优路径</a>
            </form>
        </div>
    </div>


    <table class="list">
        <tr>
            <th>主键</th>
            <th>仓库名</th>
            <th>经纬度</th>
            <th>操作</th>
        </tr>
        <tr th:each="store : ${stores}">
            <td th:text="${store.id}">Null</td>
            <td th:text="${store.name}">Null</td>
            <td th:text="${store.longAndLat}">Null</td>
            <td>
                <a th:href="@{'/query-commoidty' +  '?token=' + ${user.token} + '&id=' + ${store.id} }">进入仓库</a>
            </td>
        </tr>
    </table>

</div>
<script>

</script>
</body>
</html>
